package countPoints;

import java.util.HashSet;
import java.util.Set;

public class Solution {
    public int countPoints(String rings) {
        //
        // 最多一百个杆
        int ans = 0;
        HashSet<Character>[] gans = new HashSet[101];
        for (int i = 0; i < rings.length(); i+=2) {
            gans[Integer.parseInt(rings.charAt(i+1)+"")].add(rings.charAt(i));
        }
        for (int i = 0; i < gans.length; i++) {
            if(gans[i].size() == 3) ans++;
        }
        return ans;
    }
}
